<?php
class main extends Mclog {

    public function init(){
        if ( is_readable( APP_PATH . '/system/config.php' ) ) {
            header( 'Location: ' . mc_blog_url() . '/' );
            exit;
        }
    }

    public function index( $c, $a ) {
        mc_rm( APP_TPL . APP_MODULE . '/', false );
        mc_rm( APP_CACHE . '/', false );
        include $this->display( 'index' );
    }

    public function _db() {
        $model = mc_model( 'install' );
        echo $model->checkDB();
    }

    public function _install() {
        $model = mc_model( 'install' );
        echo $model->install();
    }
}